package org.icosagon.utils;

/**
 * Holds information on how large a creature can be.
 * @author Daniel Owens
 */
public class NumberConstraints {
    private double max, min;
    /*
     * Fill in correct and complete size constants later.
     */
    public NumberConstraints() {
        this.max = 0.0;
        this.min = 0.0;
    }
    
    public NumberConstraints(double min, double max) {
        this.setMaximum(max);
        this.setMinimum(min);
    }
    
    /**
     * If value is equal to or less than 0 this function does nothing.
     * @param max
     */
    public void setMaximum(double max) {
        if(max <= 0)
            return;
        this.max = max;
    }
    
    /**
     * If value is equal to or less than 0 this function does nothing.
     * @param max
     */
    public void setMinimum(double min) {
        if(min <= 0)
            return;
        this.min = min;
    }
    
    public double getMaximum() {
        return max;
    }
    
    public double getMinimum() {
        return min;
    }
}
